Skip to content

Remove INAV from Position Control #30037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

lthall
Copy link
Contributor

@lthall lthall commented May 11, 2025

This PR removes INAV from the position controller and replaces many functions in the main code to directly reference the position controller state where approriate.

Board,blimp,bootloader,copter,heli,plane,rover,sub
CubeOrange,608,*,1008,1024,688,760,648

@IamPete1
Copy link
Member

On plane this make me very nervous that we will forget to call update_estimates, I think the current plane changes don't get them all, and going forward it will be hard to not introduce bugs.

What is the goal or removing inav? It is still used for loiter and circle so this change makes it possible this users are have a different value the pos controller.

Why not add the call pos_control.update_estimates where inertial_nav.update is called now? It would be less code, and remove the possibility of forgetting to call it, the disadvantage would be a little more computation as it would be called when its not used.

@lthall lthall force-pushed the 20250506_postype-through-ahrs branch from 6b01897 to c0023b8 Compare May 11, 2025 23:15
@lthall
Copy link
Contributor Author

lthall commented May 11, 2025

On plane this make me very nervous that we will forget to call update_estimates, I think the current plane changes don't get them all, and going forward it will be hard to not introduce bugs.

What is the goal or removing inav? It is still used for loiter and circle so this change makes it possible this users are have a different value the pos controller.

Why not add the call pos_control.update_estimates where inertial_nav.update is called now? It would be less code, and remove the possibility of forgetting to call it, the disadvantage would be a little more computation as it would be called when its not used.

You are completly correct. Doing it now.

@lthall lthall force-pushed the 20250506_postype-through-ahrs branch 4 times, most recently from 2f3146b to 2c4f73f Compare May 12, 2025 03:56
@lthall lthall force-pushed the 20250506_postype-through-ahrs branch 2 times, most recently from 202447f to e2164d4 Compare May 12, 2025 08:15
@lthall
Copy link
Contributor Author

lthall commented May 12, 2025

On plane this make me very nervous that we will forget to call update_estimates, I think the current plane changes don't get them all, and going forward it will be hard to not introduce bugs.
What is the goal or removing inav? It is still used for loiter and circle so this change makes it possible this users are have a different value the pos controller.
Why not add the call pos_control.update_estimates where inertial_nav.update is called now? It would be less code, and remove the possibility of forgetting to call it, the disadvantage would be a little more computation as it would be called when its not used.

You are completly correct. Doing it now.

This has resulted in a crash dump but I don't understand why.

Fixed

@lthall lthall force-pushed the 20250506_postype-through-ahrs branch from e2164d4 to 7d03568 Compare May 12, 2025 22:53
…ude 'float'

can't have both postype and these methods, something has to shift names
…de 'float'

can't have both postype and these methods, something has to shift names
…float'

can't have both postype and these methods, something has to shift names
… 'float'

can't have both postype and these methods, something has to shift names
…de 'float'

can't have both postype and these methods, something has to shift names
…clude 'float'

can't have both postype and these methods, something has to shift names
…de 'float'

can't have both postype and these methods, something has to shift names
… 'float'

can't have both postype and these methods, something has to shift names
peterbarker and others added 12 commits May 13, 2025 08:30
…lude 'float'

can't have both postype and these methods, something has to shift names
…'float'

can't have both postype and these methods, something has to shift names
…de 'float'

can't have both postype and these methods, something has to shift names
…float'

can't have both postype and these methods, something has to shift names
…oat'

can't have both postype and these methods, something has to shift names
…oat'

can't have both postype and these methods, something has to shift names
@lthall lthall force-pushed the 20250506_postype-through-ahrs branch 2 times, most recently from 4f8848a to 85c80c1 Compare May 13, 2025 11:05
@lthall lthall force-pushed the 20250506_postype-through-ahrs branch from 85c80c1 to 0c360f9 Compare May 13, 2025 12:04
@lthall
Copy link
Contributor Author

lthall commented May 13, 2025

Is this the right name?

get_pos_NEU_cm
get_pos_current_NEU_cm
get_pos_estimate_NEU_cm

I think I like get_pos_estimate_NEU_cm

@lthall lthall force-pushed the 20250506_postype-through-ahrs branch from 0c360f9 to c1efd81 Compare May 13, 2025 14:03
@lthall lthall requested review from rmackay9 and IamPete1 May 15, 2025 10:48
@lthall lthall force-pushed the 20250506_postype-through-ahrs branch from c1efd81 to 7b69232 Compare May 15, 2025 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants